<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%recommend_position_product}}".
 *
 * @property int $id
 * @property int $position_id
 * @property string $image
 * @property string $link
 * @property string $title
 * @property int $product_id
 * @property int $width
 * @property int $height
 * @property int $order
 * @property string $date_start
 * @property string $date_end
 * @property int $status
 */
class RecommendPositionProduct extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%recommend_position_product}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['position_id', 'image', 'link', 'title', 'width', 'height', 'order', 'status'], 'required'],
            [['position_id', 'product_id', 'width', 'height', 'order', 'status'], 'integer'],
            [['date_start', 'date_end'], 'safe'],
            [['image', 'link', 'title'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'position_id' => Yii::t('app', 'Position ID'),
            'image' => Yii::t('app', 'Image'),
            'link' => Yii::t('app', 'Link'),
            'title' => Yii::t('app', 'Title'),
            'product_id' => Yii::t('app', 'Product ID'),
            'width' => Yii::t('app', 'Width'),
            'height' => Yii::t('app', 'Height'),
            'order' => Yii::t('app', 'Order'),
            'date_start' => Yii::t('app', 'Date Start'),
            'date_end' => Yii::t('app', 'Date End'),
            'status' => Yii::t('app', 'Status'),
        ];
    }
}
